import request from '@/utils/request'

// 完成任务
export function complete(data) {
  return request({
    url: "/system/workflow/task/complete",
    method: "post",
    data: data,
  });
}

// 委派任务
export function delegate(data) {
  return request({
    url: "/system/workflow/task/delegate",
    method: "post",
    data: data,
  });
}

// 转办任务
export function transfer(data) {
  return request({
    url: "/system/workflow/task/transfer",
    method: "post",
    data: data,
  });
}

// 退回任务
export function returnTask(data) {
  return request({
    url: "/system/workflow/task/return",
    method: "post",
    data: data,
  });
}

// 拒绝任务
export function rejectTask(data) {
  return request({
    url: "/system/workflow/task/reject",
    method: "post",
    data: data,
  });
}

// 签收任务
export function claimTask(data) {
  return request({
    url: "/system/workflow/task/claim",
    method: "post",
    data: data,
  });
}

// 可退回任务列表
export function returnList(data) {
  return request({
    url: "/system/workflow/task/returnList",
    method: "post",
    data: data,
  });
}
// 提交表单
export function submitList(data, businessType) {
  return request({
    url: "/system/workflow/task/submit/" + businessType,
    method: "post",
    data: data,
  });
}
// 暂存表单
export function updateFormList(data, businessType) {
  return request({
    url: "/system/workflow/task/updateForm/" + businessType,
    method: "post",
    data: data,
  });
}
